import { request } from 'umi';

// 获取企业微信登录URL
export async function getLoginUrl() {
  return request('/api/auth/login/url', {
    method: 'GET',
  });
}

// 处理企业微信回调
export async function handleCallback(params: { code: string; state: string }) {
  return request('/api/auth/callback', {
    method: 'GET',
    params,
  });
}

// 获取当前用户信息
export async function getCurrentUser() {
  return request('/api/auth/current-user', {
    method: 'GET',
  });
} 